//
//  IGBatchRequestGroup.h
//  jingdongfang
//
//  Created by BOE on 2018/5/3.
//  Copyright © 2018年 BOE-SBG-CTO. All rights reserved.
//

#import <Foundation/Foundation.h>

/** api请求结果错误状态 */
typedef NS_ENUM(NSInteger, IGRequestGroupStatus) {
    IGRequestGroupStatusInit = 0,       //接口请求初始状态
    IGRequestGroupStatusStart = 1,      //接口请求开始状态
    IGRequestGroupStatusSuccess,        //接口请求成功
    IGRequestGroupStatusIOSException,   //iOS代码错误
    IGRequestGroupStatusLogicErr,       //业务异常/业务失败
    IGRequestGroupStatusServerErr = 5   //请求超时或者服务器异常---->提示请求超时
};
@interface IGBatchRequestGroup : NSObject
typedef void(^IGBatchRequestQueueCompletionBlock)(id responseObject, NSInteger index, NSError *error, BOOL allComplete);
@property (nonatomic, assign, getter=getResultStatus) IGRequestGroupStatus resultStatus;

- (void)startWithBaseRequest:(NSArray<IGBaseRequest *> *)baseRequestArr decodeClassArr:(NSArray<Class> *)decodeClassArr CompletionBlockWithSuccess:(IGBatchRequestQueueCompletionBlock)completion;

@end
